package com.aacar.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.aacar.dao.AreaDao;
import com.aacar.dao.base.CommonBaseDao;
import com.aacar.entity.Area;
import com.aacar.entity.City;
import com.aacar.vo.AreaVo;
import com.aacar.vo.CityVo;
import com.aacar.vo.ProvinceVo;
import com.aacar.vo.RoomNameVo;

/**
 * 省市区
 * @author wangh
 *
 */
@Repository("areaDao")
public class AreaDaoImpl extends CommonBaseDao implements AreaDao{
	
	private static final String nameSpace = "com.aacar.dao.AreaDao.";
	
	//获取所有的省份
	public List<ProvinceVo> getProvinceList() {
		return super.getSqlSession().selectList(nameSpace+"getProvinceList");
	}
	
	//获取所有城市列表
	public List<CityVo> getCityList(City city) {
		return super.getSqlSession().selectList(nameSpace+"getCityList",city);
	}
	
	//获取所有区列表
	public List<AreaVo> getAreaList(Area area) {
		return super.getSqlSession().selectList(nameSpace+"getAreaList",area);
	}

	@Override
	public List<RoomNameVo> getRoomList() {
		return super.getSqlSession().selectList(nameSpace+"getRoomList");
	}

}
